import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
import NotFound from './components/notFound/NotFound';

export default function createApp() {
  const container = document.createElement('div');
  container.id = 'app';
  document.body.appendChild(container);

  IF(!process.env.isMiniprogram);
  ReactDOM.render(<App />, container);
  ELSE;
  ReactDOM.render(<App page={<NotFound />} />, container);
  END;
}

IF(!process.env.isMiniprogram);
createApp();
END;
